package com.ciwong.epaper.common.dialogbottom.reread;

import android.content.Context;
import android.text.TextUtils;

import com.ciwong.epaper.R;
import com.ciwong.epaper.modules.evaluate.ui.dialogfragment.bean.CheckReReadBean;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class CheckReReadWordBottomDialog extends BaseReReadBottomDialog {

    public static final int ITEM_ZERO = 0;//第0个条目
    public static final int ITEM_FIRST = 1;//第一个条目
    public static final int ITEM_TOW = 2;//第一个条目
    public static final int ITEM_THREE = 3;//第一个条目
    public static final int SCORE_90 = 90;//
    public static final int SCORE_80 = 80;//
    public static final int SCORE_70 = 70;//
    public static final int SCORE_60 = 60;//

    public static final String ITEM_NAME_ZERO = "低于90分";//第零条目
    public static final String ITEM_NAME_FIRST = "低于80分";//第一个条目
    public static final String ITEM_NAME_TOW = "低于70分";//第二个条目
    public static final String ITEM_NAME_THREE = "低于60分";//第三个条目
    public static List<CheckReReadBean> listBean =new ArrayList<>();
    /**
     * 初始化数据
     *
     */
    static  {

        if (mHashMap == null) {
            mHashMap = new HashMap<>();
        }
        CheckReReadBean checkReReadBean = new CheckReReadBean(ITEM_ZERO,true, R.mipmap.below_90_clickable, R.mipmap.below_90_unclick, ITEM_NAME_ZERO,false,SCORE_90,0);
        CheckReReadBean checkReReadBean1 = new CheckReReadBean(ITEM_FIRST,true, R.mipmap.below_80_clickable,R.mipmap.below_80_unclick, ITEM_NAME_FIRST,false,SCORE_80, 0);
        CheckReReadBean checkReReadBean2 = new CheckReReadBean(ITEM_TOW, true,R.mipmap.below_70_clickable,R.mipmap.below_70_unclick, ITEM_NAME_TOW,false,SCORE_70, 0);
        CheckReReadBean checkReReadBean3 = new CheckReReadBean(ITEM_THREE, true,R.mipmap.below_60_clickable, R.mipmap.below_60_unclick, ITEM_NAME_THREE,false,SCORE_60, 0);
        mHashMap.put(SCORE_90,checkReReadBean);
        mHashMap.put(SCORE_80,checkReReadBean1);
        mHashMap.put(SCORE_70,checkReReadBean2);
        mHashMap.put(SCORE_60,checkReReadBean3);
        if (listBean ==null)
            listBean =new ArrayList<>();

        listBean.add(checkReReadBean);
        listBean.add(checkReReadBean1);
        listBean.add(checkReReadBean2);
        listBean.add(checkReReadBean3);

    }

    public CheckReReadWordBottomDialog(Context context, int style) {
        super(context, style);
    }
    public void setDialogTitle(String titleDialog){
        if (tvTitleBottom!=null&&!TextUtils.isEmpty(titleDialog))
        tvTitleBottom.setText(titleDialog);
    }

}
